{template '_header'}

<div class="page-heading">
    <span class='pull-right'>
        {ifp 'commission.set.edit'}
            <a class='btn btn-primary btn-sm' data-toggle='ajaxModal' href="{php echo webUrl('commission/bank/add')}"><i class="fa fa-plus"></i> 添加支持的银行</a>
        {/if}
    </span>
    <h2>银行设置</h2> </div>

<form action="" method="post">
    {if count($list)>0}
    <table class="table table-hove table-responsive">
        <thead class="navbar-inner">
        <tr>
            <th style='width:100px'>顺序</th>
            <th style='width:200px'>银行名称</th>
            <th style='width:200px;'>状态</th>
            <th style='width:200px'>操作</th>
        </tr>
        </thead>
        <tbody>
        {loop $list $item}
        <tr>
            <td>
                {ifp 'commission.set.edit'}
                <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo webUrl('commission/bank/displayorder',array('id'=>$item['id']))}" >{$item['displayorder']}</a>
                {else}
                {$row['displayorder']}
                {/if}
            <td>{$item['bankname']}</td>

            <td>
                <span class='label {if $item['status']==1}label-success{else}label-default{/if}'
                {ifp 'commission.set.edit'}
                data-toggle='ajaxSwitch'
                data-switch-value='{$item['status']}'
                data-switch-value0='0|禁用|label label-default|{php echo webUrl('commission/bank/status',array('status'=>1,'id'=>$item['id']))}'
                data-switch-value1='1|启用|label label-success|{php echo webUrl('commission/bank/status',array('status'=>0,'id'=>$item['id']))}'
                {/if}>
                {if $item['status']==1}启用{else}禁用{/if}</span>

            </td>
            <td style="text-align:left;">
                {ifp 'commission.set.edit'}
                <a href="{php echo webUrl('commission/bank/edit', array('id' => $item['id']))}" data-toggle='ajaxModal' class="btn btn-default btn-sm" >
                    <i class='fa fa-edit'></i>{ifp 'commission.set.edit'}修改{else}查看{/if}
                </a>
                {/if}
                {ifp 'commission.set.edit'}
                <a data-toggle='ajaxRemove' href="{php echo webUrl('commission/bank/delete', array('id' => $item['id']))}"class="btn btn-default btn-sm" data-confirm='确认要删除此银行吗?'><i class="fa fa-trash"></i> 删除</a>
                {/if}
            </td>
        </tr>
        {/loop}

        </tbody>
    </table>

    {else}
    <div class='panel panel-default'>
        <div class='panel-body' style='text-align: center;padding:30px;'>
            暂时没有支持的银行!
        </div>
    </div>
    {/if}
</form>

{template '_footer'}